#ifndef __PROJECT_FIFO_PRO_H__
#define __PROJECT_FIFO_PRO_H__
#include <typescommon.h>

typedef uint32_t queuetype;
struct queArrayStruct
{
	uint8_t *saveBuf;//缓冲区
	queuetype windex;	
	queuetype rindex;
    queuetype bufLen;
};

void queArrayInit(struct queArrayStruct *finf, uint8_t *usrp, queuetype savelen);
void queArrayInput(struct queArrayStruct *finf, const uint8_t *inbuf, queuetype len);
queuetype queArraySize(struct queArrayStruct *finf);
queuetype queArrayOutput(struct queArrayStruct *finf, uint8_t *outbuf, queuetype len);
queuetype queArrayGetWithSize(struct queArrayStruct *finf, uint8_t *outbuf, queuetype len);
#define charQueueDefIstc(qname, qsize) \
    uint8_t qname##SaveBuffer[qsize];  \
    struct queArrayStruct qname = {qname##SaveBuffer, 0, 0, qsize};
#endif
